Optimal. Leaf size=119 \[ \frac {a b \sec ^8(c+d x)}{4 d}+\frac {a^2 \tan (c+d x)}{d}+\frac {\left (3 a^2+b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {3 \left (a^2+b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {\left (a^2+3 b^2\right ) \tan ^7(c+d x)}{7 d}+\frac {b^2 \tan ^9(c+d x)}{9 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3587, 710,
1824} \begin {gather*} \frac {\left (a^2+3 b^2\right ) \tan ^7(c+d x)}{7 d}+\frac {3 \left (a^2+b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {\left (3 a^2+b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {a^2 \tan (c+d x)}{d}+\frac {a b \sec ^8(c+d x)}{4 d}+\frac {b^2 \tan ^9(c+d x)}{9 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 710
Rule 1824
Rule 3587
Rubi steps
\begin {align*} \int \sec ^8(c+d x) (a+b \tan (c+d x))^2 \, dx &=\frac {\text {Subst}\left (\int (a+x)^2 \left (1+\frac {x^2}{b^2}\right )^3 \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {a b \sec ^8(c+d x)}{4 d}+\frac {\text {Subst}\left (\int \left (1+\frac {x^2}{b^2}\right )^3 \left (-2 a x+(a+x)^2\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {a b \sec ^8(c+d x)}{4 d}+\frac {\text {Subst}\left (\int \left (a^2+\frac {\left (3 a^2+b^2\right ) x^2}{b^2}+\frac {3 \left (a^2+b^2\right ) x^4}{b^4}+\frac {\left (a^2+3 b^2\right ) x^6}{b^6}+\frac {x^8}{b^6}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {a b \sec ^8(c+d x)}{4 d}+\frac {a^2 \tan (c+d x)}{d}+\frac {\left (3 a^2+b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {3 \left (a^2+b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {\left (a^2+3 b^2\right ) \tan ^7(c+d x)}{7 d}+\frac {b^2 \tan ^9(c+d x)}{9 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.63, size = 133, normalized size = 1.12 \begin {gather*} \frac {\tan (c+d x) \left (1260 a^2+1260 a b \tan (c+d x)+420 \left (3 a^2+b^2\right ) \tan ^2(c+d x)+1890 a b \tan ^3(c+d x)+756 \left (a^2+b^2\right ) \tan ^4(c+d x)+1260 a b \tan ^5(c+d x)+180 \left (a^2+3 b^2\right ) \tan ^6(c+d x)+315 a b \tan ^7(c+d x)+140 b^2 \tan ^8(c+d x)\right )}{1260 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.28, size = 138, normalized size = 1.16
method | result | size |
derivativedivides | \(\frac {-a^{2} \left (-\frac {16}{35}-\frac {\left (\sec ^{6}\left (d x +c \right )\right )}{7}-\frac {6 \left (\sec ^{4}\left (d x +c \right )\right )}{35}-\frac {8 \left (\sec ^{2}\left (d x +c \right )\right )}{35}\right ) \tan \left (d x +c \right )+\frac {a b}{4 \cos \left (d x +c \right )^{8}}+b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{9 \cos \left (d x +c \right )^{9}}+\frac {2 \left (\sin ^{3}\left (d x +c \right )\right )}{21 \cos \left (d x +c \right )^{7}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{5}}+\frac {16 \left (\sin ^{3}\left (d x +c \right )\right )}{315 \cos \left (d x +c \right )^{3}}\right )}{d}\) | \(138\) |
default | \(\frac {-a^{2} \left (-\frac {16}{35}-\frac {\left (\sec ^{6}\left (d x +c \right )\right )}{7}-\frac {6 \left (\sec ^{4}\left (d x +c \right )\right )}{35}-\frac {8 \left (\sec ^{2}\left (d x +c \right )\right )}{35}\right ) \tan \left (d x +c \right )+\frac {a b}{4 \cos \left (d x +c \right )^{8}}+b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{9 \cos \left (d x +c \right )^{9}}+\frac {2 \left (\sin ^{3}\left (d x +c \right )\right )}{21 \cos \left (d x +c \right )^{7}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{5}}+\frac {16 \left (\sin ^{3}\left (d x +c \right )\right )}{315 \cos \left (d x +c \right )^{3}}\right )}{d}\) | \(138\) |
risch | \(\frac {32 i \left (-630 i a b \,{\mathrm e}^{10 i \left (d x +c \right )}+315 a^{2} {\mathrm e}^{10 i \left (d x +c \right )}-315 b^{2} {\mathrm e}^{10 i \left (d x +c \right )}-630 i a b \,{\mathrm e}^{8 i \left (d x +c \right )}+819 a^{2} {\mathrm e}^{8 i \left (d x +c \right )}+189 b^{2} {\mathrm e}^{8 i \left (d x +c \right )}+756 a^{2} {\mathrm e}^{6 i \left (d x +c \right )}-84 b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+324 a^{2} {\mathrm e}^{4 i \left (d x +c \right )}-36 b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+81 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}-9 b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+9 a^{2}-b^{2}\right )}{315 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{9}}\) | \(199\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 133, normalized size = 1.12 \begin {gather*} \frac {140 \, b^{2} \tan \left (d x + c\right )^{9} + 315 \, a b \tan \left (d x + c\right )^{8} + 1260 \, a b \tan \left (d x + c\right )^{6} + 180 \, {\left (a^{2} + 3 \, b^{2}\right )} \tan \left (d x + c\right )^{7} + 1890 \, a b \tan \left (d x + c\right )^{4} + 756 \, {\left (a^{2} + b^{2}\right )} \tan \left (d x + c\right )^{5} + 1260 \, a b \tan \left (d x + c\right )^{2} + 420 \, {\left (3 \, a^{2} + b^{2}\right )} \tan \left (d x + c\right )^{3} + 1260 \, a^{2} \tan \left (d x + c\right )}{1260 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 122, normalized size = 1.03 \begin {gather*} \frac {315 \, a b \cos \left (d x + c\right ) + 4 \, {\left (16 \, {\left (9 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{8} + 8 \, {\left (9 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{6} + 6 \, {\left (9 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} + 5 \, {\left (9 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + 35 \, b^{2}\right )} \sin \left (d x + c\right )}{1260 \, d \cos \left (d x + c\right )^{9}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tan {\left (c + d x \right )}\right )^{2} \sec ^{8}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.64, size = 156, normalized size = 1.31 \begin {gather*} \frac {140 \, b^{2} \tan \left (d x + c\right )^{9} + 315 \, a b \tan \left (d x + c\right )^{8} + 180 \, a^{2} \tan \left (d x + c\right )^{7} + 540 \, b^{2} \tan \left (d x + c\right )^{7} + 1260 \, a b \tan \left (d x + c\right )^{6} + 756 \, a^{2} \tan \left (d x + c\right )^{5} + 756 \, b^{2} \tan \left (d x + c\right )^{5} + 1890 \, a b \tan \left (d x + c\right )^{4} + 1260 \, a^{2} \tan \left (d x + c\right )^{3} + 420 \, b^{2} \tan \left (d x + c\right )^{3} + 1260 \, a b \tan \left (d x + c\right )^{2} + 1260 \, a^{2} \tan \left (d x + c\right )}{1260 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.68, size = 132, normalized size = 1.11 \begin {gather*} \frac {{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (a^2+\frac {b^2}{3}\right )+a^2\,\mathrm {tan}\left (c+d\,x\right )+{\mathrm {tan}\left (c+d\,x\right )}^5\,\left (\frac {3\,a^2}{5}+\frac {3\,b^2}{5}\right )+{\mathrm {tan}\left (c+d\,x\right )}^7\,\left (\frac {a^2}{7}+\frac {3\,b^2}{7}\right )+\frac {b^2\,{\mathrm {tan}\left (c+d\,x\right )}^9}{9}+a\,b\,{\mathrm {tan}\left (c+d\,x\right )}^2+\frac {3\,a\,b\,{\mathrm {tan}\left (c+d\,x\right )}^4}{2}+a\,b\,{\mathrm {tan}\left (c+d\,x\right )}^6+\frac {a\,b\,{\mathrm {tan}\left (c+d\,x\right )}^8}{4}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________